package org.example.controller;

import org.example.entity.Certificate;
import org.example.service.CertificateService;
import org.example.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName CertificateController
 * @Description TODO
 * @Author yuezhijie
 * @Date 2025年08月17日 16:32
 * @Version 1.0
 */
@RestController
@RequestMapping("certificate")
public class CertificateController {
    @Autowired
    private CertificateService certificateService;

    @GetMapping("{id}")
    public R selectByzxsId(@PathVariable("id") int id){
        List<Certificate> certificates = certificateService.selectByzxsId(id);
        return R.ok(certificates);
    }
}
